package com.cenyol.reppository.impl;

import com.cenyol.reppository.SpittleRepository;
import com.cenyol.reppository.models.Spittle;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @author Cenyol mail: mr.cenyol@gmail.com
 * @date 18/08/2017 11:34
 */
@Component
public class SpittleRepositoryImpl implements SpittleRepository{
    public List<Spittle> findSpittles(long max, int count) {
        List<Spittle> spittles = new ArrayList<Spittle>();
        for (int i = 0; i < count; i++) {
            spittles.add(new Spittle("Spittle " + i, new Date()));
        }
        return spittles;
    }
}
